package com.tiyunge.system.domain;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.tiyunge.common.annotation.Excel;
import com.tiyunge.common.annotation.Excel.ColumnType;
import com.tiyunge.common.annotation.Excel.Type;
import com.tiyunge.common.core.domain.BaseEntity;

/**
 * 年级选项对象 sys_grade_option
 *
 * @author yejiayu
 */
public class SysGradeOption extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @Excel(name = "年级ID", type = Type.EXPORT, cellType = ColumnType.NUMERIC)
    private Long id;

    /** 年级编码：J1初一 J2初二 J3初三 */
    @Excel(name = "年级编码")
    @NotBlank(message = "年级编码不能为空")
    @Size(min = 0, max = 2, message = "年级编码不能超过2个字符")
    private String gradeCode;

    /** 年级名称：初一/初二/初三 */
    @Excel(name = "年级名称")
    @NotBlank(message = "年级名称不能为空")
    @Size(min = 0, max = 32, message = "年级名称不能超过32个字符")
    private String gradeName;

    /** 显示排序（升序） */
    @Excel(name = "显示排序")
    @NotNull(message = "显示排序不能为空")
    private Integer displayOrder;

    /** 是否启用：1启用 0停用 */
    @Excel(name = "是否启用", readConverterExp = "1=启用,0=停用")
    private Integer isActive;

    /** 备注说明 */
    @Excel(name = "备注说明")
    @Size(min = 0, max = 255, message = "备注说明不能超过255个字符")
    private String description;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setGradeCode(String gradeCode)
    {
        this.gradeCode = gradeCode;
    }

    public String getGradeCode()
    {
        return gradeCode;
    }

    public void setGradeName(String gradeName)
    {
        this.gradeName = gradeName;
    }

    public String getGradeName()
    {
        return gradeName;
    }

    public void setDisplayOrder(Integer displayOrder)
    {
        this.displayOrder = displayOrder;
    }

    public Integer getDisplayOrder()
    {
        return displayOrder;
    }

    public void setIsActive(Integer isActive)
    {
        this.isActive = isActive;
    }

    public Integer getIsActive()
    {
        return isActive;
    }

    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getDescription()
    {
        return description;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("gradeCode", getGradeCode())
                .append("gradeName", getGradeName())
                .append("displayOrder", getDisplayOrder())
                .append("isActive", getIsActive())
                .append("description", getDescription())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}